

服务器代码
@SuppressWarnings({ "rawtypes", "unchecked" })
	public String listPage(HttpServletRequest req, HttpServletResponse resq)
			throws ServletException,IOException {
		
		 HttpSession session = req.getSession();
		   User user = (User)session.getAttribute("USER");
//		   System.out.println(user.getUser_id());
		   //通过用户id获取属于他发的所有邮件
			List<SendEmail> sendEmailList = sendemailService.getSendEmailByuser_id(user.getUser_id());
			HashMap  sendUser = new HashMap();
			int pc = super.getPC(req, resq);      //调用方法获得初始pc值
			
			System.out.println(pc);
			
			int tp =sendEmailList.size();     //总页码数
			if(tp%2!=0) {
				tp=tp/2+1;
			}else {
				tp=tp/2;
			}
			int k=(pc-1)*2;                       
			int j=2+(pc-1)*2;
			if(j>sendEmailList.size()){
				j=sendEmailList.size();
			}
			for (int i=k;i<j;i++ ) {
				 //这你new一个对象，地址是不同的，key中不重复
				User send_user = new User();   
				//获取一个User对象，把你方法改成我的一样获取User对象
				send_user = userService.queryUserByUser_id(sendEmailList.get(i).getGet_id());
				//key中直接放send_user对象，问题解决
				sendUser.put(send_user, sendEmailList.get(i));	
			}
			req.setAttribute("pc", pc);
			req.setAttribute("tp", tp);
			req.setAttribute("sendUser", sendUser);
		
		return "view/email/sendemail/sendemailList.jsp";
	}
	前端代码
	</tr>
				<c:forEach items="${sendUser }" var="sendUser">
				
					<tr>
						<td><input type="checkbox" name="id[]"
							value="${sendUser.value.send_email_id }" />${sendUser.value.send_email_id }</td>
						<td>${sendUser.key.name}</td>
						<td>${sendUser.value.title }</td>
						<td>${sendUser.value.text }</td>
						<td>${sendUser.value.create_time }</td>
						<td><div class="button-group">
								<a class="button border-red"
									href="<%=basePath%>sendemailController?methodName=deleteSendEmailByemailid&email_id=${sendUser.value.send_email_id   }"
									onclick="return del(1)"><span class="icon-trash-o"></span>
									删除</a> <a class="button border-red"
									href="<%=basePath%>sendemailController?methodName=TransMit&Own_id=${USER.user_id  }"><span
									class="icon-trash-o"></span> 转发</a>
							</div></td>
					</tr>
					
				</c:forEach>
				<tr>
					<td colspan="8"><div class="pagelist">
				     <a href="<c:url value='/sendemailController?methodName=listPage&pc=1'/>">首页</a>
				     <c:if test='${pc>1 }'>
				     <a href="<c:url value='/sendemailController?methodName=listPage&pc=${pc-1 }'/>">上一页</a>
				     </c:if>
				     <c:if test='${pc<tp}'>			    
				     <a href="<c:url value='/sendemailController?methodName=listPage&pc=${pc+1 }'/>">下一页</a>
				     </c:if>				    
				      <a href="<c:url value='/sendemailController?methodName=listPage&pc=${tp}'/>">尾页</a>
						</div></td>
				</tr>